﻿using DevExpress.XtraEditors;
using DevExpress.XtraPrinting.Native;
using SX_MesProject.Dtos.ZFYDto;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using static SX_MesProject.HttpClientHelper;

namespace SX_MesProject
{
    public partial class UserList : DevExpress.XtraEditors.XtraForm
    {
        public UserList()
        {
            InitializeComponent();
        }

        private void gridControl1_Load(object sender, EventArgs e)
        {
#pragma warning disable CS4014 // 由于此调用不会等待，因此在调用完成前将继续执行当前方法
            DataButton();
#pragma warning restore CS4014 // 由于此调用不会等待，因此在调用完成前将继续执行当前方法
        }
        public async Task DataButton()
        {
            //FenYeDTO<UserDto> fenYeDTO = new FenYeDTO<UserDto>();

            var res = await HttpClientHelper.RequestUrl<string, ApiResult<FenYeDTO<UserDto>>>("https://localhost:44556/", "Login/UserList?pageIndex=1&pageSize=10", MethodType.GET);
            this.gridControl1.DataSource = res.Data.data;
        }

        private void gridControl1_Click(object sender, EventArgs e)
        {

        }
    }
}